One more cubeMX problem, if you change timer cubeMX generate new HAL_TIM_PeriodElapsedCallback and delete everything inside !